<?php load_lib('/util/file'); ?>
<div class="divOption"><a href="<?php echo $arrData['strScanURL']; ?>" id="aScan">导入剧集</a></div>
<table class="tblList">
	<thead>
		<tr>
			<th>序列</th>
			<th>操作类型</th>
			<th>信息</th>
			<th>状态</th>
			<th>操作时间</th>
			<th>执行时间</th>
			<th>结束时间</th>
			<th>执行速度</th>
			<th>完成比例</th>
		</tr>
	</thead>
	<tbody>
		<?php foreach($arrHtml['arrQueueList'] as $arrQueue){ ?>
		<tr>
			<td class="ct"><?php echo $arrQueue['QID']; ?></td>
			<td class="ct">
			<?php
				$strMessage='';
				switch($arrQueue['QTYPE']){
					case 1:
						echo '导入';
						$strMessage='文件名: '.$arrQueue['QDATA']['FILENAME'].', 大小: '.util_file::formatFileSize($arrQueue['QDATA']['SIZE']);
						break;
					case 2:
						echo '发送';
						$strMessage='节目: '.$arrQueue['QDATA']['SERNAME'].', 第'.$arrQueue['QDATA']['ORDERSTR'].'集, 大小: '.util_file::formatFileSize($arrQueue['QDATA']['SIZE']).', 发送到: '.$arrQueue['QDATA']['TERMINALNAME'];
						break;
				}
			?>
			</td>
			<td><?php echo $strMessage; ?></td>
			<td class="ct">
			<?php
				$strStartTime=$strFinishTime='-';
				$floPercent=$intSpeed=0;
				switch($arrQueue['DSTATUS']){//1-等待,2-正在执行,3-执行结束,4-执行失败,5-跳过执行
					case 1:
						echo '等待';
						break;
					case 2:
						echo '正在执行';
						$strStartTime=date('Y-m-d H:i:s',$arrQueue['STARTTIME']);
						$floPercent=round(100*$arrQueue['QDATA']['FINISHSIZE']/$arrQueue['QDATA']['SIZE'],2);
						$intSpeed=$arrQueue['QDATA']['FINISHSIZE']/($arrData['intTime']-$arrQueue['STARTTIME']);
						break;
					case 3:
						echo '结束';
						$strStartTime=date('Y-m-d H:i:s',$arrQueue['STARTTIME']);
						$strFinishTime=date('Y-m-d H:i:s',$arrQueue['FINISHTIME']);
						$floPercent=100;
						break;
					case 4:
						echo '失败';
						$strStartTime=date('Y-m-d H:i:s',$arrQueue['STARTTIME']);
						$strFinishTime=date('Y-m-d H:i:s',$arrQueue['FINISHTIME']);
						break;
					case 5:
						echo '跳过';
						$strFinishTime=date('Y-m-d H:i:s',$arrQueue['FINISHTIME']);
						$floPercent=100;
						break;
				}
			?>
			</td>
			<td class="ct"><?php echo date('Y-m-d H:i:s',$arrQueue['CREATETIME']); ?></td>
			<td class="ct"><?php echo $strStartTime; ?></td>
			<td class="ct"><?php echo $strFinishTime; ?></td>
			<td class="ct"><?php echo util_file::formatFileSize($intSpeed); ?>/S</td>
			<td class="ct"><?php echo $floPercent; ?>%</td>
		</tr>
		<?php } ?>
	</tbody>
</table>
<?php $this->startLScript(); ?>
<script type="text/javascript">
(function(){
	new Queue();
})();
</script>
<?php $this->endLScript(); ?>